# -*- coding:utf-8 -*-
import sys
import pygame

from settings import Settings
from ship import Ship

def run_game ():
    """
    初始化游戏
    """
    pygame.init()
    alien_settings = Settings()

    screen = pygame.display.set_mode((alien_settings.screen_width, alien_settings.screen_height))
    pygame.display.set_caption("Alien Invasion")

    ship = Ship(alien_settings, screen)

    while True:
        """"""
        for envet in pygame.event.get():
            if envet.type == pygame.QUIT:
                sys.exit()
        
        screen.fill(alien_settings.bg_color)
        ship.blitme()
        pygame.display.flip()

run_game()